package cn.zwx.security.example.service;

import cn.zwx.security.example.entity.SysMenuEntity;
import cn.zwx.security.example.entity.SysRoleEntity;
import cn.zwx.security.example.entity.SysUserEntity;

import java.util.List;

/**
 * @description:
 * @projectName:spring-boot-security-example
 * @see:cn.zwx.security.example.service
 * @author:zhangwenxue
 * @createTime:2021/6/23 16:47
 * @version:1.0
 */
public interface SysUserService {
    /**
     * @description 根据用户id查询角色
     * @return java.util.List<cn.zwx.security.example.entity.SysRoleEntity>
     * @author zhangwenxue
     * @createTime 2021/6/23 18:08
     **/
    List<SysRoleEntity> selectSysRoleByUserId(Long userId);

    /**
     * @description 查询用户菜单
     * @return java.util.List<cn.zwx.security.example.entity.SysMenuEntity>
     * @author zhangwenxue
     * @createTime 2021/6/23 18:26
     **/
    List<SysMenuEntity> selectSysMenuByUserId(Long userId);

    /**
     * @description 根据用户名称查询用户信息
     * @return cn.zwx.security.example.entity.extend.SelfUserEntity
     * @author zhangwenxue
     * @createTime 2021/6/23 16:49
     **/
    SysUserEntity loadUserByUsername(String userName);

    List<SysUserEntity> list();
}
